package com.itheima.supermarket.manage.entry;

import com.itheima.supermarket.manage.controller.CustomerController;
import com.itheima.supermarket.manage.controller.ManagerController;

import java.util.Scanner;


//水果超市管理系统
public class EntryClass {
    public static void main(String[] args) {
        //创建键盘录入对象
        Scanner sc = new Scanner(System.in);
        //创建CustomerController对象
        CustomerController cc = new CustomerController();
        //创建ManagerController对象
        ManagerController mc = new ManagerController();

        //水果超市管理系统界面
        while (true) {
            System.out.println("====================欢迎来到啥都有水果超市！====================");
            System.out.println("请选择：1.顾客    2.管理员   3.退出系统");
            String choice = sc.next();

            switch (choice) {
                case "1":
                    //System.out.println("顾客");
                    cc.customerController();
                    break;
                case "2":
                    //System.out.println("管理员");
                    mc.managerController();
                    break;
                case "3":
                    System.out.println("谢谢惠顾，欢迎下次光临！");
                    System.exit(0);
                default:
                    System.out.println("您的输入有误，请重新输入！");
                    break;
            }
        }
    }
}
